//
//  FWRadioButtonGroup.h
//  vImageStudy
//
//  Created by Evan Xie on 8/7/15.
//  Copyright (c) 2015 Family Wings. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FWRadioButton.h"


@class FWRadioButtonGroup;
@protocol FWRadioButtonGroupDelegate <NSObject>
@optional
- (void)radioButtonGroup:(FWRadioButtonGroup *)group didSelectAtIndex:(NSInteger)buttonIndex;
@end

@interface FWRadioButtonGroup : NSObject

@property (nonatomic, weak) id <FWRadioButtonGroupDelegate> delegate;

@property (nonatomic, readonly) NSArray *radioButtons;

@property (nonatomic, assign) NSInteger selectedIndex;

- (instancetype)initWithRadioButtons:(NSArray *)radioButtons;

- (void)addRadioButton:(FWRadioButton *)radioButton;
- (void)addRadioButtons:(NSArray *)radioButtons;

- (void)selectRadioButton:(FWRadioButton *)radioButton;

@end
